Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch all and sort menu sets #24

Conversation

chrispenny
Copy link

@chrispenny chrispenny commented Oct 13, 2016

I often find it useful to loop through all MenuSets that have been created instead of having to hard code MenuSet names into our templates. This is most often the case when we're using the Menu Manager to control a single area of the website. EG: A footer with 4 MenuSets (Limit(4)), or a vertical side nav where we don't mind how many MenuSets the admin creates.

Consequently, if we're looping through MenuSets systematically then it's also useful to allow admins to change the sort order of those sets.

I'm currently achieving this by adding a method to my SiteConfig to get all MenuSets (with or without a Limit()), but I thought that others might also find this option useful.

Future improvements: Increase visibility in the CMS as to how many Set/Items are being displayed on the frontend (if they are being limited). So far though, I've found it easy enough to just tell the admins "only the top [number] will show in [area]".

wilr pushed a commit that referenced this pull request Oct 5, 2022
@wilr
Copy link
Contributor

wilr commented Oct 5, 2022

Handy! Needed this for a new project as well so rebased and merged feature in 29f8134. Thanks @chrispenny

@wilr wilr closed this Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants